home *** CD-ROM | disk | FTP | other *** search
/ Building Homes of Our Own / Building Homes of our Own.iso / setup / data1.cab / Everything / working / houCons.dxr / interface_410_SelectButton Landscaping.ls < prev    next >
Encoding:
Text File  |  2002-09-25  |  1.1 KB  |  43 lines

  1. property mySprite, myType, myName, myNameDown, myNameOver, myNameInactive, Active, ancestor, tileSprite
  2.  
  3. on beginSprite me
  4.   global gActorListMan
  5.   mySprite = me.spriteNum
  6.   myName = (the member of sprite mySprite).name
  7.   myNameDown = word 1 of myName && "down"
  8.   myNameOver = word 1 of myName && "over"
  9.   myNameInactive = word 1 of myName && "Inactive"
  10.   Active = 1
  11.   lookForToolTip = 1
  12.   ancestor = new(script("FourStatebuttonActions"), lookForToolTip)
  13.   myType = #purchaseButton
  14.   registerSprite(gActorListMan, mySprite)
  15. end
  16.  
  17. on mouseUp me
  18.   global gClickSprite, gConMan
  19.   if voidp(tileSprite) then
  20.     tileSprite = sendAllSprites(#sendSpriteNum, #tileSprite)
  21.   end if
  22.   if not Active then
  23.     exit
  24.   end if
  25.   if gClickSprite = mySprite then
  26.     doButtonUpClick(myType, 1)
  27.     sendSprite(tileSprite, #turnOn)
  28.   end if
  29. end
  30.  
  31. on clearActorList me
  32.   if Active then
  33.     set the member of sprite the mySprite of me to member(myName)
  34.   else
  35.     set the member of sprite the mySprite of me to member(myNameInactive)
  36.   end if
  37. end
  38.  
  39. on endSprite me
  40.   global gActorListMan
  41.   unRegisterSprite(gActorListMan, mySprite)
  42. end
  43.